#ifndef __SV2_VIDEO_SAVER__
#define __SV2_VIDEO_SAVER__

#include <opencv2/opencv.hpp>
#include <opencv2/aruco.hpp>
#include <opencv2/tracking.hpp>
#include <string>
#include <chrono>
#include "sv2_video_base.h"

class BsVideoSaver;

namespace sv2
{
  class VideoWriterGstreamerImpl;

  class VideoWriter : public VideoWriterBase
  {
  public:
    VideoWriter();
    ~VideoWriter();

  protected:
    bool setupImpl(std::string file_name_);
    bool isOpenedImpl();
    void writeImpl(cv::Mat img_);
    void releaseImpl();

    VideoWriterGstreamerImpl *_gstreamer_impl;
    BsVideoSaver *_ffmpeg_impl;
  };

}
#endif
